import React, { Component } from 'react';

class Child extends Component{
  render(){
    this.props.handleClick();
    return <h1>Child 组件</h1>
  }
}

class App extends Component {

  // 函数
  handleClick=(params) => {
    console.log("App 组件中：",this);// App 组件
  }
  render() {
    return (
      <div>
        <Child
          name="Thomas"
          handleClick={this.handleClick}
        ></Child>
      </div>
    );
  }
}

export default App;
